package cn.chen.controller;

import cn.chen.model.Participation;
import cn.chen.service.ParticipationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hbpu
 * @since 2023-05-28
 */
@RestController
@RequestMapping("/participation")
public class ParticipationController {
    @Autowired
    private ParticipationService participationService;

    //增
    @PostMapping("/add")
    public boolean addParticipation(@RequestBody Participation participation) {
        return  participationService.save(participation);
    }

}
